﻿// EXP0317.cpp : 从cin读入一组词并把它们存入一个vector对象，然后设法把所有词都改为大写形式。输出改变后的结果，每个词占一行。
//

#include <iostream>
#include <vector>
using namespace std;

int main()
{
    cout << "输入一组词：" << endl;
    string word;
    vector<string> strs;
    while (cin>>word)
    {
	    if (!word.empty())
	    {
            strs.push_back(word);
	    }
        
    }
    for (string& s : strs)
    {
       for (char& c : s)
	    {
           c = toupper(c);
	    }
    }
    cout << "修改后：" << endl;
    copy(strs.begin(), strs.end(), ostream_iterator<string>(cout, " "));
    cout << endl;
}


